<div class="book">
	<div class="wrapper">
		<p id="notice"><%= notice %></p>
		<table>
			<thead>
				<tr>
					<th>Book Details</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>ISBN</td>
					<td><%= @book_info.isbn %></td>
				</tr>
				<tr>
					<td>Publish Date</td>
					<td><%= @book_info.publishDate.to_date %></td>
				</tr>
				<tr>
					<td>Publisher</td>
					<td><%= @book_info.publisher %></td>
				</tr>
				<tr>
					<td>Author</td>
					<td><%= @book_info.author %></td>
				</tr>
				<tr>
					<td>Vote</td>
					<td><%= @book_info.vote %></td>
				</tr>
				<tr>
					<td>Number of Vote</td>
					<td><%= @book_info.numberOfVote %></td>
				</tr>
				<tr>
					<td>Name</td>
					<td><%= @book_info.name %></td>
				</tr>
				<tr>
					<td>Category</td>
					<td><%= @book_info.category_id %></td>
				</tr>
			</tbody>
		</table>
		<div class="action">
			<% if session[:username_or_email] == 'admin' %>
			<%= link_to 'Edit', edit_book_info_path(@book_info) %> |
			<% end %>
			<%= link_to 'Back', book_infos_path, :class => "deep-blue" %>
			
			<!--#added by Son Nguyen - 11/12/2012 - 11:22pm-->
			<%= link_to 'Borrow This Book', {:controller => "transaction", :action => "new", :book_info => @book_info}, :class => "deep-orange" %>
			<!--#added by Son Nguyen - 11/12/2012 - 11:22pm-->
		</div>
		<hr>
		<h1>Relative Books</h1>
		<div class="books">
			<table>
				<colgroup>
					<col class="column-odd">
					<col class="column-even">
					<col class="column-odd">
					<col class="column-even">
					<col class="column-odd">
					<col class="column-even">
					<col class="column-odd">
					<col class="column-even">
				</colgroup>
				<thead>
			  		<tr>
					    <th>ISBN</th>
					    <th>Publish Date</th>
					    <th>Publisher</th>
					    <th>Author</th>
					    <th>Vote</th>
					    <th>Number of Vote</th>
					    <th>Name</th>
					    <th>Category</th>
					</tr>
			    </thead>
				<tbody>
					<% @relativeBooks.each do |relativeBook| %>
				  	<tr>
					    <td><%= relativeBook.isbn %></td>
					    <td><%= relativeBook.publishDate.to_date %></td>
					    <td><%= relativeBook.publisher %></td>
					    <td><%= relativeBook.author %></td>
					    <td><%= relativeBook.vote %></td>
					    <td><%= relativeBook.numberOfVote %></td>
					    <td><%= relativeBook.name %></td>
					    <td><%= relativeBook.category.name %></td>
					</tr>
					<% end %>
				</tbody>
			</table>
		</div>
	</div>
	</div>
</div>
